﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CheckMsg.ascx.cs" Inherits="Modules_CheckMsg" %>
<%@ Register Assembly="digit.Core" Namespace="digit.Core" TagPrefix="sms" %>
<%@ Import Namespace="SMS.Helper" %>
<script type="text/javascript" language="javascript" src="DatePicker/datetimepicker.js"></script>
<div id="box">
    <h3>KIỂM TRA TIN NHẮN</h3>

    <table cellpadding="5" cellspacing="0" border="0" width="90%">
        <tr>
            <td align="center">
                Chọn đầu số : 
                <asp:DropDownList ID="ddlServicID" runat="server">
                    <asp:ListItem Text="8078" Value="80"></asp:ListItem>
                    <asp:ListItem Text="8178" Value="81"></asp:ListItem>
                    <asp:ListItem Text="8278" Value="82"></asp:ListItem>
                    <asp:ListItem Text="8378" Value="83"></asp:ListItem>
                    <asp:ListItem Text="8478" Value="84"></asp:ListItem>
                    <asp:ListItem Text="8578" Value="85"></asp:ListItem>
                    <asp:ListItem Text="8678" Value="86"></asp:ListItem>
                    <asp:ListItem Text="8778" Value="87"></asp:ListItem>
                </asp:DropDownList>          
            </td>
        </tr>
        <tr>
            <td align="center">
                Chọn loại tin : 
                <asp:DropDownList ID="ddlMsgType" runat="server">
                    <asp:ListItem Text="Tin MO" Value="mo"></asp:ListItem>
                    <asp:ListItem Text="Tin MT" Value="mt"></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td align="center"><asp:TextBox ID="txtContent" runat="server" Width="250px"  /></td>
        </tr>
        <tr>
            <td align="center">
                <asp:TextBox ID="txtFromDate" runat="server" Width="80" /><a href="javascript: NewCssCal('<%= this.txtFromDate.ClientID %>','mmddyyyy','arrow',false,12,false)"><img src="DatePicker/Images/cal.gif" width="16" height="16" border="0" alt="Chọn ngày tháng" /></a>&nbsp;&nbsp;
                <asp:TextBox ID="txtToDate" runat="server" Width="80px" /><a href="javascript: NewCssCal('<%= this.txtToDate.ClientID %>','mmddyyyy','arrow',false,12,false)"><img src="DatePicker/Images/cal.gif" width="16" height="16" border="0" alt="Chọn ngày tháng" /></a>&nbsp;&nbsp;
                <asp:Button ID="btnSearch" runat="server" Text="Tìm kiếm" OnClick="btnSearch_Click" />
            </td>
        </tr>
    </table><br />

    <table cellpadding="5" cellspacing="0" border="0" width="90%">
        <tr>
            <td align="center"><asp:Label ID="lblError" runat="server" /></td>
        </tr>
        <tr>
            <td align="center">
                <asp:GridView ID="grvSms" runat="server" Width="98%" AutoGenerateColumns="False">
                    <PagerSettings PageButtonCount="10" />
                    <FooterStyle BackColor="#1EB5DD" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#1EB5DD" ForeColor="White" />
                    <RowStyle Height="30px" ForeColor="#333333" HorizontalAlign="Center" />
                    <HeaderStyle BackColor="#eeecdf" Font-Bold="True" ForeColor="#a4363a" />
                    <AlternatingRowStyle BackColor="#f7f6f0" Height="30px" ForeColor="#284775" />
                    <Columns>
                    <asp:TemplateField>
                        <HeaderStyle HorizontalAlign="Center" Width="20px" />
                        <HeaderTemplate>
                            <input type="checkbox" id="cbxHeader" runat="server" value="" onclick="MarkAll()" style="border:0px" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <input type="checkbox" id="cbxItem" runat="server" value='<%# Eval("MsgInID") %>' onclick="MarkOne()" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Stt">
                        <ItemTemplate><%# Container.DataItemIndex + 1 %></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Số ĐT" HeaderStyle-Wrap="false">
                        <ItemTemplate><%# Eval("MobileNo") %></ItemTemplate>
                    </asp:TemplateField> 
                    <asp:TemplateField HeaderText="Nội dung" HeaderStyle-Wrap="false">
                        <ItemTemplate><%# Eval("MsgContent")%></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Mạng" HeaderStyle-Wrap="false">
                        <ItemTemplate><%# FormHelper.FormatSMSC(Eval("MobileNo").ToString())%></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Thời gian" HeaderStyle-Wrap="false">
                        <ItemTemplate><%# Eval("RequestTime") %></ItemTemplate>
                    </asp:TemplateField>            
                    <asp:TemplateField HeaderText="Trạng thái" HeaderStyle-Wrap="false">
                        <ItemTemplate><%# FormHelper.FormatMsgInStatus(Util.ToInteger(Eval("Status").ToString()))%></ItemTemplate>
                    </asp:TemplateField>
                </Columns>
	            </asp:GridView>
            </td>
        </tr>
    </table><br />
</div>